<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <!-- <link rel="stylesheet" href="/index/css/style.css">
    <link rel="stylesheet" href="/index/css/org.css"> -->
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
    <link rel="stylesheet" href="/index/css/bootstrap.min.css" type="text/css">
    <script src="/index/js/bootstrap.min.js"></script>
    <link rel="stylesheet" href="/index/css/goods/theme.css">
    <link rel="stylesheet" href="/index/css/goods/public.css">
    <link rel="stylesheet" href="/index/css/goods/shop.css">
    <link rel="stylesheet" type="text/css" href="/index/css/goods/update.css">
    <script src="/index/js/goods/public.js"></script>
    <script src="/index/js/goods/choose.js"></script>
    <title>商品详情</title>
</head>
<body>
<div class="container">
    <div class="row classify-block" style="padding-top:20px">
        <div class="logo col-md-1">
            <a href="/"><img src="/images/logofooter.png" alt=""></a>
        </div>
        <div class="col-md-11">
            <div class="classify">
            <ul class="list-unstyled all-goods-type clearfix"  style="font-size: 15px;" >
               <li class="pull-left" >
                        <a href="/">首页</a>
               </li>
               <li class="pull-left crceate-fl">
                        <a href="/index/product/goods_product">所有商品</a>
               </li>
               <!-- 小米系列 -->
               <li class="pull-left create-fl" id="cate-qyjp">
                    <a href="" id="tj">小米系列</a>
                    <div class="fenlei-detail-block">
                        <div class="fenlei-detail">
                            <ul class="list-unstyled fenlei-two clearfix">
                             {volist name="xiaomi" id="vo"}
                                <li class="pull-left">
                                    <a href="/index/goods/goods?id={$vo.id}" target="_blank">
                                        <div class="goods-img" style="border-left: none;">
                                            {volist name="pricture" id="vi"} 
                                                {if($vo.id == $vi.goods_id)}
                                                   <img src="{$vi.main}" alt="ZTE中兴">
                                                 {/if}
                                            {/volist}
                                        </div>
                                        <div class="goods-data">
                                            <div class="goods-name-block">
                                                  <span>{$vo.brand}<-->{$vo.category}</span>
                                            </div>
                                            <div class="goods-pri-block">
                                            {volist name="result" id="vl"}                             
                                                    {if($vo.id == $vl.goods_id)}
                                                    <span class="new-pri">￥<strong>{$vl.price}</strong></span>    
                                                    {/if}  
                                            {/volist}
                                            </div>
                                        </div>
                                    </a>
                                </li>
                                {/volist}
                            </ul>
                        </div>
                    </div>   
                </li>
               <!--华为系列 -->
                <li class="pull-left create-fl" id="cate-jxpj">
                    <a href="">华为系列</a>
                    <div class="fenlei-detail-block" style="display: none; height: 228px; padding-top: 0px; margin-top: 0px; padding-bottom: 0px; margin-bottom: 0px;">
                        <div class="fenlei-detail">
                            <ul class="list-unstyled fenlei-two clearfix">
                             {volist name="huawei" id="vo"}
                                <li class="pull-left">
                                    <a href="/index/goods/goods?id={$vo.id}" target="_blank">
                                        <div class="goods-img" style="border-left: none;">
                                                {volist name="pricture" id="vi"} 
                                                    {if($vo.id == $vi.goods_id)}
                                                       <img src="{$vi.main}" alt="ZTE中兴">
                                                     {/if}
                                                {/volist} 
                                        </div>
                                        <div class="goods-data">
                                            <div class="goods-name-block">
                                                 <span>{$vo.brand}<-->{$vo.category}</span>
                                            </div>
                                            <div class="goods-pri-block">
                                                {volist name="result" id="vl"}                             
                                                        {if($vo.id == $vl.goods_id)}
                                                        <span class="new-pri">￥<strong>{$vl.price}</strong></span>    
                                                        {/if}  
                                                {/volist} 
                                            </div>
                                        </div>
                                    </a>
                                </li>
                             {/volist}
                            </ul>
                        </div>
                    </div>
                </li>
                <!--OPPO系列 -->
                <li class="pull-left create-fl" id="cate-jxpj">
                        <a href="">OPPO系列</a>
                        <div class="fenlei-detail-block" style="display: none; height: 228px; padding-top: 0px; margin-top: 0px; padding-bottom: 0px; margin-bottom: 0px;">
                            <div class="fenlei-detail">
                                <ul class="list-unstyled fenlei-two clearfix">
                                 {volist name="oppo" id="vo"}
                                    <li class="pull-left">
                                        <a href="/index/goods/goods?id={$vo.id}" target="_blank">
                                            <div class="goods-img">
                                                {volist name="pricture" id="vi"} 
                                                    {if($vo.id == $vi.goods_id)}
                                                       <img src="{$vi.main}" alt="ZTE中兴">
                                                     {/if}
                                                {/volist} 
                                            </div>
                                            <div class="goods-data">
                                                <div class="goods-name-block">
                                                   <span>{$vo.brand}<-->{$vo.category}</span>
                                                </div>
                                                <div class="goods-pri-block">
                                                {volist name="result" id="vl"}                             
                                                        {if($vo.id == $vl.goods_id)}
                                                        <span class="new-pri">￥<strong>{$vl.price}</strong></span>    
                                                        {/if}  
                                                {/volist}   
                                                </div>
                                            </div>
                                        </a>
                                    </li>
                                  {/volist}
                                </ul>
                            </div>
                        </div>
                    </li>
                <li class="pull-left crceate-fl">
                    <a href="/index/product/goods_product">更多商品</a>
                </li>
            </ul>
                <div class="search">
                    <div class="search-icon">
                       <div class="input-block">
                           <input type="text" id="input_keyword" placeholder="天机7">
                       </div>
                       <div class="button-block">
                           <button type="button"><img src="/index/images/search.png"></button>
                       </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="container main-container">
    <!--兼容版商品详情-->
<div class="product-container" id="compatible_version">
    <div class="bread" style="height: 45px;">
        <ol class="breadcrumb">
            <li><a href="/index.html">首页</a></li>
            <li><a href="">手机</a></li>
            <li><a href="">系列</a></li>
            <li class="active">ZTE</li>
        </ol>
    </div>
    <div class="product-page">
        <div class="row goods-block">
            <div class="col-xs-6 img-block">
                <div class="product-main-image" style="position: relative; overflow: hidden;">
                    <a href="" target="_blank">
                        <img src="{$images.main}" alt="" >
                    </a>
                </div>
                <!-- 首页大图导航 -->
                <div class="pic-slide">
                    <!-- <div class="prev">
                        <img height="50" src="/index/images/left-1.png">
                    </div> -->
                    <div class="pic-list">
                        <ul class="product-other-images list-inline">
                            <li class="current">
                                <a href="">
                                    <img height=50 src="{$images.main}" />
                                </a>
                                <span class="pointer"></span>
                            </li>
                            <li> 
                                <a href="">
                                    <img height=50 src="{$images.main}" />
                                </a>
                                <span class="pointer"></span>
                            </li>
                            <li>
                                <a href="">
                                    <img height=50 src="{$images.image1}" />
                                </a>
                                <span class="pointer"></span>
                            </li>
                            <li>
                                <a href="">
                                    <img height=50 src="{$images.image2}" />
                                </a>
                                <span class="pointer"></span>
                            </li>
                            <li>
                                <a href="">
                                    <img height=50 src="{$images.image3}" />
                                </a>
                                <span class="pointer"></span>
                            </li>
                            <li>
                                <a href="">
                                    <img height=50 src="{$images.image4}" />
                                </a>
                                <span class="pointer"></span>
                            </li>
                        </ul>
                    </div>
                   <!--  <div class="next">
                        <img height="50" src="/index/images/right-1.png">
                    </div> -->
                </div>
            </div>
            <div class="col-xs-6 goods-detail-block">
                <h1>
                    {$goods.category}<br>
                </h1>
                <div class="description text-danger">
                    <p>{$goods.abstract}</p>
                </div>
                <div class="price-availability-block clearfix">
                    <span class="price text-danger">
                        <strong id="price">&nbsp;</strong>
                    </span>
                </div>
                <hr style="margin-bottom: 8px;">
                <div class="sales-promotion-block" style="display:none">
                    <dl class="dl-horizontal">
                        <label>促销详情<span style=""></span></label>
                        <span class="fl" style="padding-top:6px">:</span>
                        <ul class="list-unstyled promotion-list">
                        </ul>
                    </dl>
                </div>
                <!-- 规格选择器 -->
                <div class="choose">
                    <div class="colorchoosebox">
                        <ul>
                            <li>选择颜色:</li>
                        </ul>
                        <ul>
                            {volist name="color" id="result"}
                            <li class="color">
                                <input type="hidden" value="{$result}"/>
                                <a href="javascript:void(0);" class="color_choose">{$result}</a>
                            </li>
                            {/volist}
                        </ul>
                    </div>

                </div>
                <div class="choose">
                    <div class="memorychoosebox">
                        <ul>
                            <li>选择内存:</li>
                        </ul>
                        <ul>
                            {volist name="memory" id="result"}
                            <li class="memory">
                                <input type="hidden" value="{$result}"/>
                                <a href="javascript:void(0);" class="memory_choose">{$result}</a>
                            </li>
                            {/volist}
                        </ul>
                    </div>
                </div>
                <div class="choose">
                    <div class="versionchoosebox">
                        <ul>
                            <li>选择版本:</li>
                        </ul>
                        <ul>
                            {volist name="version" id="result"}
                            <li class="version">
                                <input type="hidden" value="{$result}"/>
                                <a href="javascript:void(0);" class="version_choose">{$result}</a>
                            </li>
                            {/volist}
                        </ul>
                    </div>
                </div>
<script type="text/javascript">
// 获取选择状态
$(function(){
    $('.colorchoosebox li a').click(function(){
        var thisToggle = $(this).is('.color_choose') ? $(this) : $(this).prev();
        var checkBox = thisToggle.prev();
        checkBox.trigger('click');
        $('.color_choose').removeClass('current');
        thisToggle.addClass('current');
        return false;
    });     
});
$(function(){
    $('.memorychoosebox li a').click(function(){
        var thisToggle = $(this).is('.memory_choose') ? $(this) : $(this).prev();
        var checkBox = thisToggle.prev();
        checkBox.trigger('click');
        $('.memory_choose').removeClass('current');
        thisToggle.addClass('current');
        return false;
    });     
});
$(function(){
    $('.versionchoosebox li a').click(function(){
        var thisToggle = $(this).is('.version_choose') ? $(this) : $(this).prev();
        var checkBox = thisToggle.prev();
        checkBox.trigger('click');
        $('.version_choose').removeClass('current');
        thisToggle.addClass('current');
        return false;
    });     
});

// 初始化默认值
var color = $(".color input").val();
var memory = $(".memory input").val();
var version = $(".version input").val();

// 获取选择的属性信息
$(".color input").click(function(){
    color = $(this).val();
});
$(".memory input").click(function(){
    memory = $(this).val();
});
$(".version input").click(function(){
    version = $(this).val();
});

// 获取URL中查询的一类商品的id
var urlid=getGoodsid("id");
function getGoodsid(name)

{
    var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
    var r = window.location.search.substr(1).match(reg);
    if(r!=null)return  unescape(r[2]); return null;
}
// 页面加载时读取默认价格
$(function(){
    $(".color_choose:first").addClass('current');
    $(".memory_choose:first").addClass('current');
    $(".version_choose:first").addClass('current');
    if (color && memory && version) {
        $.post("getPrice",{'id':urlid,'color':color,'memory':memory,'version':version},function(json){
            $("#price").text(json['price']);
            var goodsid = json['id'];
            var stock = $("#price").text();
            if (stock == "无货") {
                $("#addcart").addClass('disabled');
                $("#buynow").addClass('disabled');
            } 
            if (stock != "无货") {
                $("#addcart").removeClass('disabled');
                $("#buynow").removeClass('disabled');
            }
            // 获取选择的产品id，更改a标签跳转参数值
            $("#addcart").attr("href","addcart?goodsid=" + goodsid); 
        },'json');
    }
});
// AJAX查询价格
$("li").click(function(){
    if (color && memory && version) {
        $.post("getPrice",{'id':urlid,'color':color,'memory':memory,'version':version},function(json){         
            $("#price").text(json['price']);
            var goodsid = json['id'];
            var stock = $("#price").text();
            if (stock == "无货") {
                $("#addcart").addClass('disabled');
                $("#buynow").addClass('disabled');
            } 
            if (stock != "无货") {
                $("#addcart").removeClass('disabled');
                $("#buynow").removeClass('disabled');
            }
            // 获取选择的产品id，更改a标签跳转参数值
            $("#addcart").attr("href","addcart?goodsid=" + goodsid);

        },'json');
    }
});
</script>
<!-- <script type="text/javascript">
    // 添加喜欢的商品
    $("#like").click(function(){
        
        $.post('addlike',[],function(data){

        });
    });
</script> -->
                <!--购买区-->
                <div class="product-page-cart product-buy">
                    <!-- <hr> -->
                    <a class="btn btn-danger" id="addcart" href="">加入购物车</a>
                    <a class="btn btn-success " id="buynow" href="">立即购买</a>
                    <a class="glyphicon glyphicon-heart-empty" href='' style="text-decoration: none" id="addlike">收藏
                        <small><em></em></small>
                    </a>
                </div>
            </div>
        </div>
        <div class="row goods-introduce">
            <div class="col-xs-12">
                <div class="product-page-content">
                    <div class="hot-goods">
                        <div class="hot-title">热销商品排行</div>
                        <ul class="list-unstyled clearfix hotsail-list">
                        </ul>
                    </div>
                    <div class="clearfix pull-left" style="width:750px">
                        <ul id="pp_tabs" class="nav nav-tabs">
                            <li class="active"><a href="#desc" data-toggle="tab">产品介绍</a></li>
                            <li><a href="#parameter"  href_="/index/goods/goods?id={$id}" data-toggle="tab">规格参数</a></li>
                            <li><a href="#comment"  href_="/index/goods/goods?id={$id}" data-toggle="tab">评论列表(0)</a></li>
                            <li><a href="#question"   href_="/index/goods/goods?id={$id}" data-toggle="tab">会员评论</a></li>
                            <li><a href=""></a></li>
                        </ul>
                        <div  class="tab-content">
                            <div class="tab-pane fade in active" id="desc">
                                <div class="description">
                                    <p>
                                    <img src="/index/images/b7dca424cace.jpg" style="">
                                    <img src="/index/images/8339e8051087.jpg" style="">
                                    <img src="/index/images/190a767eefbf.jpg" style="">
                                    <img src="/index/images/580499574874.jpg" style="">
                                    <br>
                                    </p>                                
                                </div>
                            </div>
                            <div class="tab-pane fade" id="parameter">
                            <!-- 商品参数 -->
                                <div class="detail-parameter">
                                    <div class="fl para-pic">主体</div>
                                    <div class="fl para-text">
                                        <ul>
                                            <!-- 读取商品参数 -->
                                            <li>
                                                <span>商品名称</span>
                                                ZTE中兴 Blade V8 绝代双“焦”-后置双摄+3D拍照</li>
                                            <li>
                                                <span>商品品牌</span>
                                                ZTE中兴
                                            </li>
                                            <li>
                                                <span>商品分类</span>
                                                Blade系列
                                            </li>
                                        </ul>
                                    </div>
                                </div>
                                <div class="row detailparam-info">
                                    <div class="col-xs-6">
                                        <div class="info-warp">
                                            <div class="detail-cate">CPU及操作系统</div>
                                                <div class="detail-item">
                                                    <table class="table table-inner">
                                                    <tr>
                                                        <td class="item-key">CPU型号:</td>
                                                        <td class="item-value">骁龙435</td>
                                                    </tr>
                                                    <tr>
                                                        <td class="item-key">CPU频率:</td>
                                                        <td class="item-value">A53 1.4GHz x 4 + A53 1.0GHz X4</td>
                                                    </tr>
                                                    </table>
                                                </div>
                                                <div class="detail-cate">网络</div>
                                                <div class="detail-item">
                                                    <table class="table table-inner">
                                                        <tr>
                                                            <td class="item-key">4G网络制式:</td>
                                                            <td class="item-value">移动（TD-LTE)；4G：联通(FDD-LTE)；4G：电信(FDD-LTE)；4G：联通(TD-LTE)</td>
                                                        </tr>
                                                     
                                                    </table>
                                                </div>
                                                <div class="detail-cate">存储</div>
                                                <div class="detail-item">
                                                    <table class="table table-inner">
                                                        <tr>
                                                            <td class="item-key">运行内存（RAM）:</td>
                                                            <td class="item-value">4GB</td>
                                                        </tr>
                                                     
                                                    </table>
                                                </div>
                                                <div class="detail-cate">显示</div>
                                                <div class="detail-item">
                                                    <table class="table table-inner">
                                                        <tr>
                                                            <td class="item-key">屏幕尺寸:</td>
                                                            <td class="item-value">5.2</td>
                                                        </tr>
                                                    </table>
                                                </div>
                                                <div class="detail-cate">感应器</div>
                                                <div class="detail-item">
                                                    <table class="table table-inner">
                                                        <tr>
                                                            <td class="item-key">GPS模块:</td>
                                                            <td class="item-value">支持</td>
                                                        </tr>
                                                    </table>
                                                </div>
                                                <div class="detail-cate">摄像功能</div>
                                                <div class="detail-item">
                                                    <table class="table table-inner">
                                                        <tr>
                                                            <td class="item-key">主摄像头:</td>
                                                            <td class="item-value">1300+200</td>
                                                        </tr>
                                                    </table>
                                                </div>
                                                <div class="detail-cate">传输功能</div>
                                                <div class="detail-item">
                                                    <table class="table table-inner">
                                                        <tr>
                                                            <td class="item-key">WIFI:</td>
                                                            <td class="item-value">支持</td>
                                                        </tr>
                                                    </table>
                                                </div>
                                                <div class="detail-cate">其他</div>
                                                <div class="detail-item">
                                                    <table class="table table-inner">
                                                        <tr>
                                                            <td class="item-key">SIM卡尺寸:</td>
                                                            <td class="item-value">Nano SIM</td>
                                                        </tr>
                                                       </table>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                            </div>
                            <div class="tab-pane fade" id="comment">
                                    <ul>
                                       {volist name="list" id="vo"} 
                                        
                                           <li>
                                              {$vo.discuss} 
                                           </li>
                                  
                                       {/volist}
                                    </ul>
                            </div>
                            <div class="tab-pane fade" id="question">
                                <div class="well question-block">
                                   {if !(empty($data))}
                                     <form action="\index\goods\comment_add" method="post">
                                    <div class="consult-search clearfix">
                                        <div class="form-group pull-left">
                                            <!-- <label class="sr-only" for="name">咨询</label> -->
                                            <input type="hidden" class="form-control" name="id" value="{$goods.id}">
                                             <input type="hidden" class="form-control" name="category" value="{$goods.category}">
                                              <input type="hidden" class="form-control" name="username" value="{$data.username}">
                                            <input type="text" class="form-control" id="keyword" name="discuss" placeholder="请输入你的评论">
                                        </div>
                                        <div class="submit-button pull-left">
                                            <button type="submit" class="btn btn-default">提交评论</button>
                                        </div>
                                    </div>
                                    </form>
                                  {else}
                                  <div class="consult-search clearfix">
                                        <div class="form-group pull-left">
                                            <!-- <label class="sr-only" for="name">咨询</label> -->
                                            <input type="text" class="form-control" id="keyword" placeholder="请先登录">
                                        </div>
                                        <div class="submit-button pull-left">
                                            <button type="submit" class="btn btn-default">提交评论</button>
                                        </div>
                                    </div>
                                    {/if}
                                    <h5 class="questions-number"></h5>
                                    <div class="consult-block">
                                    </div>
                                    <div class="more-questions">
                                        <a href="javascript:;">查看更多></a>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- 商品小图上翻下翻 -->
<script type="text/javascript">
    $(document).ready(function(){
        var num_li = $('.product-other-images li').length;
        if(num_li>=5){
            $('.pic-slide .next').on("click",function(){
                $('.product-other-images').animate({"margin-left":"-74px"},200,function(){
                    $(this).css({"margin-left":"0px"}).find("li:first-child").appendTo(this);
                });
            });
            $('.pic-slide .prev').on("click",function(){
                $('.product-other-images').find("li:last-child").prependTo('.product-other-images').css({"margin-left":"-74px"}).animate({"margin-left":"0px"},200,function(){
                });
            });
        }else{
            return;
        }
    });
</script>
</div>

<div class="footer">

<!-- <div class="footer">
    <div class="footer-inner">
        <div class="footer-top">
            <ul class="list-unstyled clearfix">
                <li class="pull-left">
                    <img src="/index/images/7.png" alt="">
                    <span>7天无理由退货</span>
                </li>
                <li class="pull-left">
                    <img src="/index/images/30.png" alt="">
                    <span>15天换货保障</span>
                </li>
                <li class="pull-left">
                    <img src="/index/images/mian.png" alt="">
                    <span>150元起免运费</span>
                </li>
                <li class="pull-left">
                    <img src="/index/images/position.png" alt="">
                    <span>全国联保 售后无忧</span>
                </li>
            </ul>
        </div>
        <div class="footer-center">
            <div class="footer-plus">
                <div class="help-center">
                    <ul class="list-unstyled clearfix">
                        <li class="help-title"><a href="javascript:;">联系我们</a></li>
                        <li class="help-list">
                            <ul class="list-unstyled">
                                <li><a href="">新浪微博</a></li>
                                <li><a href="">官方微信</a></li>
                                <li><a href="">中兴社区</a></li>
                            </ul>
                        </li>
                    </ul>
                    <ul class="list-unstyled clearfix">
                        <li class="help-title"><a href="javascript:;">帮助中心</a></li>
                        <li class="help-list">
                            <ul class="list-unstyled">
                                <li><a href="">购物指南</a></li>
                                <li><a href="">配送指南</a></li>
                                <li><a href="">支付方式</a></li>
                            </ul>
                        </li>
                    </ul>
                    <ul class="list-unstyled clearfix">
                        <li class="help-title"><a href="javascript:;">售后服务</a></li>
                        <li class="help-list">
                            <ul class="list-unstyled">
                                <li><a href="">保修政策</a></li>
                                <li><a href="">退换货政策</a></li>
                                <li><a href="">退换货流程</a></li>
                                <li><a href="">售后网点</a></li>
                            </ul>
                        </li>
                    </ul>
                    <ul class="list-unstyled clearfix">
                        <li class="help-title"><a href="javascript:;">关于我们</a></li>
                        <li class="help-list">
                            <ul class="list-unstyled">
                                <li><a href="">关于公司</a></li>
                                <li><a href="">企业礼品团购</a></li>
                                <li><a href="">商城简介</a></li>
                                <li><a href="">联系我们</a></li>
                            </ul>
                        </li>
                    </ul>
                </div>          
            </div>
        </div>
    </div>
</div> -->

</body>
</html>